const router = require('express').Router();

const cateModel = require('../models/qf_cates')

router.get('/admin',(req,res)=>{
    // 获取cookie
    // 判断 cookie是否有值
    console.log(req.cookies['userInfo'])
    let userInfo = req.cookies['userInfo']? JSON.parse(req.cookies['userInfo']):{};

    res.render("admin",{
        userInfo
    })
})

router.get('/main',(req,res)=>{
    res.render("main")
})

router.get('/setting',(req,res)=>{
    res.render("setting")
})



module.exports = router